#ifndef FILETHREAD_H
#define FILETHREAD_H

#include <QObject>
#include <QtNetwork>
#include <QtSql>
#include <QThread>

class FileThread : public QThread
{
    Q_OBJECT
public:
    FileThread(int socketDescriptor);
protected:
    void run();
private slots:
    void read();
private:
    void write();
    QTcpSocket * connection;
    QSqlDatabase db;
    quint64 blockSize;
    QByteArray response;
    QDataStream out;
    QBuffer * buffer;
};

#endif // FILETHREAD_H
